<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="bean.Content"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<form action="../write?id=${content.id}" method="post" id="modifyForm" name="modifyForm">
	<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
			<td style="padding-top: 15">
				题目：
				<input type="text" name="modifyTitle" id="modifyTitle" value="${content.title}" size="60" />
			</td>
		</tr>
		<tr>
			<td style="padding-top: 10">
				内容：（请在下面编辑框中填写）,图片宽度不宜超过600像素。<span style="color: red">上传的图片不支持中文命名</span>
			</td>
		</tr>
		<tr align="center">
			<td style="padding-top:10" align="center">
				<script type="text/javascript">
					var oFCKeditor = new FCKeditor("edt1");
					oFCKeditor.BasePath = "../fckeditor/";
					oFCKeditor.Height = '470';
					oFCKeditor.Width = '680';
					oFCKeditor.Value = "${content.data}";
					oFCKeditor.Create();
				</script>
			</td>
		</tr>
		<tr>
			<td style="padding-top:10" align="center">
				<input type="button" value="提交" onclick="modifySubmit()">
				<input type="button" value="预览" onclick="preview()">
			</td>
		</tr>
	</table>
</form>

<script type="text/javascript">
	function modifySubmit() {
		var title = document.modifyForm.modifyTitle.value;
		if(title == "") {
			alert("请输入标题!");
		} else {
			document.modifyForm.submit();
		}
	}
	function preview() {
		document.getElementById("modifyForm").action = "previewModify.jsp";
		document.modifyForm.submit();
	}
</script>
